<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>大旺福-区域经理登录</title>
	<link rel="stylesheet" href="/assets/css/bootstrap.min.css">
	<link rel="stylesheet" href="/assets/css/common.css">
	<link rel="stylesheet" href="/assets/css/css.css">
	<style>
		.wrapper{
			padding:20px 15px;
		}
		.form-item{
			margin-bottom:15px;
		}
		button{
			width:100%;
		}

		input{
			width: 100%;
			height: 40px;
			font-size: 20px;
			color: #6e6e6e;
			border: 1px solid #dcdcdc;
			border-radius: 3px;
			background-color: #fff;
			text-indent: 10px;
		}
	</style>
  </head>
  <body>
  	<div id="message_info"></div>
	<div class="wrapper">
		<div class="form-item">
			<input type="tel" name="username" maxlength="11" placeholder="手机号" class="tel borderOne">
		</div>
		<div class="form-item">
			<input type="password" name="password" placeholder="密码" class="pwd borderOne">
		</div>
		<div class="btn-block">
			<button type="button" class="btn btn-success block">登录</button>
		</div>
	</div>
	<script src="/assets/js/jquery-1.10.2.min.js"></script>
	<script src="/assets/js/bootstrap.min.js"></script>
	<script src="/assets/js/public.js"></script>
	{literal}
	<script type="text/javascript">
		$(function(){
			$(".block").click(function(){
				var username = $("input.tel").val();
				var password = $("input.pwd").val();
				if(username == '' || password == ''){
					showError('手机号码或者密码不能为空！');
					return false;
				}
				var data = {username:username,password:password};
				$.ajax({
					type:"post",
					url:"/wechat/login/check/",
					async:false,
					dataType:"json",
					data:data,
					success:function(data){
						if(data.errorCode == "ok"){
							location.href = "/wechat/member/order_list/";
						}else{
							showError(data.errorMessage);
					return false;
						}
					}
				});
			});
		});
	</script>
	{/literal}
  </body>
</html>